package com.rambler.crawler.job;

import com.rambler.crawler.spider.WeatherSpider;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class FetchWeatherJob {

    @Resource
    private WeatherSpider weatherSpider;

    @Scheduled(cron = "*/10 * * * * ?")
    public void runWeatherFetch() {
        weatherSpider.execute();
//        log.info("开始抓取天气信息");
    }
}
